package main;
import java.io.PrintWriter;
import java.lang.management.*;


//Nikolas Wolfe
//4/13/09
//CIS 4930
//Game of Life 2

/* =============================================================================
* Outputs data about the architecture
*/

public class OpSysSnoop
{
	private static final OperatingSystemMXBean os = ManagementFactory.getOperatingSystemMXBean();
	
	public static void snoopOS()
	{
		System.out.println("Arch: " + os.getArch());
		System.out.println("Available Processors: " + os.getAvailableProcessors());
		System.out.println("OS name: " + os.getName());
		System.out.println("OS version: " + os.getVersion());
		System.out.println("System load average: " + os.getSystemLoadAverage());
	}
	
	public static void snoopOsIntoFile( PrintWriter writer )
	{
		writer.println("Arch: " + os.getArch());
		writer.println("Available Processors: " + os.getAvailableProcessors());
		writer.println("OS name: " + os.getName());
		writer.println("OS version: " + os.getVersion());
		writer.println("System load average: " + os.getSystemLoadAverage());
	}
}
